require.config({
              baseUrl:"../",
               paths:{
               bsl:'bsl',
               
               }
               });
require(['bsl'],function(bsl){
        document.addEventListener('deviceready', onDeviceready, false);
        function onDeviceready(){
        alert("star");
        
        function zipfile(){
        var PathToFileInString  = "file:///storage/emulated/O/zbsl",
        PathToResultZip     = "file:///storage/emulated/O/";
        
        if(window.device.platform.toLowerCase().indexOf("ios") > -1) {
        
        PathToFileInString  =bsl.documentsDirectory+"demo",
        PathToResultZip     =bsl.documentsDirectory;

        }
        
        alert('PathToFileInString>>>>>>'+PathToFileInString);
        alert('PathToResultZip>>>>>>'+PathToResultZip);
        bsl.zip.zip(PathToFileInString, {target:PathToResultZip,name:"SuperZip.zip"},function(data){
                  alert('data'+data);
                  },function(error){
                  alert('error'+error);
                  })
        
        }
        function unZipfile(){
        alert("uniFileZip");
        var PathToFileInString  = bsl.externalRootDirectory+"SuperZip.zip",
        PathToResultZip     = bsl.externalRootDirectory;
        
        if(window.device.platform.toLowerCase().indexOf("ios") > -1) {
        
        PathToFileInString  =bsl.documentsDirectory+"SuperZip.zip",
        PathToResultZip     = bsl.documentsDirectory+"aa";
        
        }
        bsl.zip.unzip(PathToFileInString, {target:PathToResultZip},function(data){
                    alert('success'+data);
                    },function(error){
                     alert('error'+error);
                    })
        }
        
        document.getElementById("zipfile").addEventListener("click",zipfile,false);
        document.getElementById("unZipfile").addEventListener("click",unZipfile,false);
        // document.getElementById("decompress").addEventListener("click",decompress,false);
        }
        });